home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / tutor / pro13 / names3.bas < prev    next >
Encoding:
BASIC Source File  |  1990-11-13  |  703 b   |  23 lines

  1. 10 'NAMES3.BAS - Read in ten names from a disk file and store in memory
  2. 20 'From the GWBT06 Basic Tutorial Series 11/15/1990
  3. 30 '
  4. 40 'Variables used:
  5. 50 DIM NAMES$(10)
  6. 60 '
  7. 70 'Start of Main Program:
  8. 80 OPEN "NAMES.TXT" FOR INPUT AS #1
  9. 90 FOR NAMES=1 TO 10
  10. 100 INPUT #1,NAMES$(NAMES)
  11. 110 NEXT NAMES
  12. 120 CLOSE #1
  13. 130 'Names read in, now let's print them to the screen and get a choice...
  14. 140 CLS
  15. 150 FOR NAMES=1 TO 10
  16. 160 PRINT USING "## - \                         \";NAMES,NAMES$(NAMES)
  17. 170 NEXT NAMES
  18. 180 PRINT
  19. 250 INPUT "Enter a number from 1 to 10 for the desired name";NAMENUMBER
  20. 260 PRINT "Your selected name is: ";NAMES$(NAMENUMBER)
  21. 270 END
  22. 280 'End of program - NAME1.BAS
  23.